The samples presented in this Chapter can be compiled either with Delphi 2.0 or with Delphi 1.0. Conditional compilation directives are used to resolve any version specific dependencies. If you compile with one version of Delphi, and load the project in the other version, be aware that you will most likely get an one or more initial warnings pertaining to the differences between the two version. You can ignore the warnings, save the whole project within the Delphi version you're using and then simply recompile.
Since the code has been written in a portable way, if you are using Delphi 2.0, make sure that the Environment Library Options define the following unit aliases:
If you have not changed Delphi 2.0's default configuration, then these unit aliases are already defined.
The samples in this chapter are about local database programming. Most of them will refer to Delphi's default sample database. If you have Delphi 2.0 the default sample database will be in
C:\Program Files\Borland\Delphi 2.0\Demos\Data
and if you have Delphi 1.0, it will be in
C:\DELPHI\DEMOS\DATA
In either case, the Borland Database Engine should be configured with Delphi's default DBDEMOS alias.
If you don't have the default sample database or the default DBDEMOS alias, refer to Delphi's installation instructions.
Note that in order to follow the step by step instructions in this chapter you will also need Delphi's Database Desktop utility program. Again, if it is not installed, refer to Delphi's installation instructions.
If you follow the step by step instructions in this chapter, you will eventually end up creating three new local database directories, and configure the Borland Database Engine with corresponding aliases.
If you just want to try out the samples, without following the step by step instructions, keep in mind that the three aliases need to be defined in order to run the corresponding samples. This is how the aliases need to be defined:
ALIAS DIRECTORY
--------------- ------------------------------
CLIENTSDATABASE C:\DDS\CHAP07\HOWTO02\DATABASE
SECUREDATABASE C:\DDS\CHAP07\HOWTO07\DATABASE
TABLEDRIVE C:\DDS\CHAP07\HOWTO08\DATABASE
All three of the above aliases are of the STANDARD type. Also keep in mind that in the above table it is assumed that all sample files are installed in their default directories on drive C:. If you have a different setup, make changes accordingly.
Before you go ahead and compile the sample HowTo projects, keep in mind that some of them refer to units developed in other HowTos of this chapter. In order for the compilation to succeed the Project Options Search Path must be defined to point to the right places. These are the dependencies: